package com.taxi.apipassenger.remote;

import com.taxi.apipassenger.config.TagLoadBalancerConfig;
import com.taxi.common.dto.ResponseResult;
import com.taxi.common.response.NumberCodeResponse;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @Author ruomengjiang
 * @Date 2022/7/7
 * @Description : online-taxi
 * @Version: 1.0
 */
@FeignClient(value = "service-verificationcode", path = "/service-verificationcode", fallbackFactory = ServiceVerificationCodeFallbackFactory.class)
@LoadBalancerClient(name = "service-verificationcode", configuration = TagLoadBalancerConfig.class)
public interface ServiceVefificationcodeClient {

    @RequestMapping(method = RequestMethod.GET, value = "/numberCode/{size}")
    ResponseResult<NumberCodeResponse> getNumberCode(@PathVariable("size") int size, @RequestHeader("tag") String tag);

}
